package mysqloperate;
import people.*;

import java.sql.Connection;
import java.sql.Statement;

public class addusermysql {
    public addusermysql(){

    }
    public void adduser(User user)throws Exception{

        String sql="insert into user values('"+user.getId()+"','"+user.getPassword()+"')";
        connection con=new connection();
        Connection connection=con.getconnection();
        Statement statement=connection.createStatement();
        int num=statement.executeUpdate(sql);
        statement.close();
        connection.close();
    }
}
